﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using SARControlLib;

namespace RadarSim
{
	public partial class PdMain:PageBase
	{
        public PdMain()
		{
			this.InitializeComponent();
            // 在此点之下插入创建对象所需的代码。    

            DataGridTextColumn dtc0 = new DataGridTextColumn();
            dtc0.Header = "目标";
            Binding b0 = new Binding();
            b0.Path = new PropertyPath("Head0");
            dtc0.Binding = b0;

            DataGridTextColumn dtc1 = new DataGridTextColumn();
            dtc1.Header = "距离";
            Binding b1 = new Binding();
            b1.Path = new PropertyPath("Head1");
            dtc1.Binding = b1;

            DataGridTextColumn dtc2 = new DataGridTextColumn();
            dtc2.Header = "速度";
            Binding b2 = new Binding();
            b2.Path = new PropertyPath("Head2");
            dtc2.Binding = b2;

            DataGridTextColumn dtc3 = new DataGridTextColumn();
            dtc3.Header = "加速度";
            Binding b3 = new Binding();
            b3.Path = new PropertyPath("Head3");
            dtc3.Binding = b3;

            DataGridTextColumn dtc4 = new DataGridTextColumn();
            dtc4.Header = "方位";
            Binding b4 = new Binding();
            b4.Path = new PropertyPath("Head4");
            dtc4.Binding = b4;

            DataGridTextColumn dtc5 = new DataGridTextColumn();
            dtc5.Header = "幅值";
            Binding b5 = new Binding();
            b5.Path = new PropertyPath("Head5");
            dtc5.Binding = b5;

            this.sARDataTable1.SARnterDataGrid.Columns.Add(dtc0);
            this.sARDataTable1.SARnterDataGrid.Columns.Add(dtc1);
            this.sARDataTable1.SARnterDataGrid.Columns.Add(dtc2);
            this.sARDataTable1.SARnterDataGrid.Columns.Add(dtc3);
            this.sARDataTable1.SARnterDataGrid.Columns.Add(dtc4);
            this.sARDataTable1.SARnterDataGrid.Columns.Add(dtc5);
            //this.sARDataTable1.DataGridTitle = "mmmm";      





            DataGridTextColumn rdtc0 = new DataGridTextColumn();
            rdtc0.Header = "目标";
            Binding rb0 = new Binding();
            rb0.Path = new PropertyPath("Head0");
            rdtc0.Binding = rb0;

            DataGridTextColumn rdtc1 = new DataGridTextColumn();
            rdtc1.Header = "距离";
            Binding rb1 = new Binding();
            rb1.Path = new PropertyPath("Head1");
            rdtc1.Binding = rb1;

            DataGridTextColumn rdtc2 = new DataGridTextColumn();
            rdtc2.Header = "速度";
            Binding rb2 = new Binding();
            rb2.Path = new PropertyPath("Head2");
            rdtc2.Binding = rb2;

            DataGridTextColumn rdtc3 = new DataGridTextColumn();
            rdtc3.Header = "加速度";
            Binding rb3 = new Binding();
            rb3.Path = new PropertyPath("Head3");
            rdtc3.Binding = rb3;

            DataGridTextColumn rdtc4 = new DataGridTextColumn();
            rdtc4.Header = "方位";
            Binding rb4 = new Binding();
            rb4.Path = new PropertyPath("Head4");
            rdtc4.Binding = rb4;

            DataGridTextColumn rdtc5 = new DataGridTextColumn();
            rdtc4.Header = "幅值";
            Binding rb5 = new Binding();
            rb5.Path = new PropertyPath("Head5");
            rdtc5.Binding = rb5;

            this.sARDataTable2.SARnterDataGrid.Columns.Add(rdtc0);
            this.sARDataTable2.SARnterDataGrid.Columns.Add(rdtc1);
            this.sARDataTable2.SARnterDataGrid.Columns.Add(rdtc2);
            this.sARDataTable2.SARnterDataGrid.Columns.Add(rdtc3);
            this.sARDataTable2.SARnterDataGrid.Columns.Add(rdtc4);
            this.sARDataTable2.DataGridTitle = "实时信息";
		}

        public bool AppConfigClick()
        {
            return true;
        }
        public bool ControlArgsClick()
        {
            this.CtrlArgs.Visibility = Visibility.Visible;
            this.sARDataTable2.Visibility = Visibility.Collapsed;
            this.sARDataTable1.Visibility = Visibility.Visible;
            return true;
        }
        public bool InitArgsClick()
        {
            this.CtrlArgs.Visibility = Visibility.Collapsed;
            this.sARDataTable2.Visibility = Visibility.Visible;
            return true;
        }
        public bool RealTimeInfoClick()
        {
            this.CtrlArgs.Visibility = Visibility.Collapsed;
            this.sARDataTable2.Visibility = Visibility.Visible;
            this.sARDataTable1.Visibility = Visibility.Collapsed;
            return true;
        }
	}
}